import {defineProps, defineComponent, h} from "vue";
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import {
  ElIcon,
} from "element-plus";

export default defineComponent({
  name: 'RenderIconByKey',
  props: {
    iconKey: {
      type: String,
      required: true
    }
  },
  setup(props) {
    // @ts-expect-error
    return () => h(ElIcon, () => h(ElementPlusIconsVue[props.iconKey]))
  }
});
